package appendix;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateFormatDemo {
	public static void main(String [] args){
		SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
		SimpleDateFormat format2 = new SimpleDateFormat("hh-mm-ss");
		SimpleDateFormat format3 = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");
		
		Date now = new Date();
		
		System.out.println(format1.format(now));
		System.out.println(format2.format(now));
		System.out.println(format3.format(now));
	}
}
